package reflect;

import java.lang.reflect.Method;

public class ReflectDemo11 {
    public static void main(String[] args) throws Exception {
        Class c=Class.forName("reflect.Person");
        Method method = c.getMethod("watchTV");

        if(method.isAnnotationPresent(AutoRunMethod.class))
        {
            AutoRunMethod arm= method.getAnnotation(AutoRunMethod.class);
            int value=arm.value();
            System.out.println(value);
        }
    }
}
